interface Man1 {
    fortune: string;
}

interface Man2 {
    funny: string;
}

interface Man3 {
    foreign: string;
}
// 需求ManType只能是其中一种类型
type ManType = Man1 | Man2 | Man3; 

let man:ManType = {
    fortune: "富有",
    funny: "风趣", 
    foreign: "洋派"
}
// 互斥属性
// man1 - man2 将man1的属性标记成never + man2
// man2 - man1 将man2的属性标记成never + man1
type AAA = Exclude<keyof Man1, keyof Man2>;
type DiscardType<T,U> = {
    [K in Exclude<keyof T, keyof U>]?: never
};
type OrType<T,U> = (DiscardType<T,U> & U) | (DiscardType<U,T> & T);
type manType2 = OrType<Man3,OrType<Man1, Man2>>; //多个对象可进行互斥
let man1: manType2 = {
    fortune: "富有"
};
// 核心就是 我要排除你的属性，在我的结构里定义成never


export {}